package com.kupurui.asteacher.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.android.frame.ui.BaseFragment;

import java.util.List;

/**
 * Created by Administrator on 2017/8/9.
 */

public class TopicDetailsFgtAdapter extends FragmentPagerAdapter {

    private FragmentManager fragmetnmanager;  //创建FragmentManager
    private List<BaseFragment> listfragment; //创建一个List<Fragment>

    public TopicDetailsFgtAdapter(FragmentManager fm,List<BaseFragment> listfragment) {
        super(fm);
        this.fragmetnmanager = fm;
        this.listfragment = listfragment;
    }

    @Override
    public Fragment getItem(int position) {
        return listfragment.get(position);
    }

    @Override
    public int getCount() {
        return listfragment.size();
    }
}
